import Vue from 'vue'
import Router from 'vue-router'
import First from '@/components/First'
import Signin from '@/components/Signin'
import Signup from '@/components/Signup'
import Admin from '@/components/admin'


Vue.use(Router)

const router = new Router({
  routes: [
    {
      path:"/",
      redirect:"/admin"
    },
    {
      path: '/first',
      name: 'First',
      component: First
    },
    {
      path:"/signin",
      name:"Signin",
      component:Signin
    },
    {
      path:"/signup",
      name:"Signup",
      component:Signup
    },
    {
      path:"/admin",
      name:"Admin",
      component:Admin,
      children:[
        {
          path:"/article",
          name:"Article",
          component:()=>import('../components/article')
        },
        {
          path:"/user",
          name:"User",
          component:()=>import('../components/user')
        }
      ]
    }

  ]
})

export default router;